home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
fweb
/
fweb-1.40
/
boot
/
unix
/
apollo
/
READ_ME.APOLLO
< prev
Wrap
Text File
|
1993-10-29
|
4KB
|
142 lines
--- BOOTSTRAPPING FWEB on the APOLLO ---
Version 1.23
February 15, 1992
This subdirectory is intended for bootstrapping on the Apollo
workstation. However, this code hasn't yet been tested locally for v. 1.1
or v. 1.2, as I don't have access to an Apollo. Therefore, IF YOU'RE
THINKING OF WORKING WITH FWEB ON THE APOLLO, PLEASE see the appendix below,
and/or CHECK WITH ME.
To bootstrap, do the following from your top-level fweb directory:
set BOOT = boot/unix/apollo
cp $BOOT/.fweb $HOME
cp $BOOT/custom.h web
* Edit setup.mk to reflect your directory structure.
* Edit web/custom.h as best you can, following the instructions in that file.
* Edit $BOOT/defaults.mk to specify your compile and link line.
Then, say
make bootstrap
If you have difficulty compiling, go back, play with custom.h some more,
and try again. Let me know what you did.
APPENDIX: CHANGES for APOLLO RELEASE SR10.2
Steve Brown has graciously provided (August 22, 1991) the following changes
appropriate for the not-fully-ANSI release SR10.2. I haven't had time to
rework the source code to incorporate these changes, so I include his
message here essentially verbatim:
-------------------------------------------------------------------------------
The first file I changed was boot/unix/apollo/default.mk. The compiler
won't let you use -o $@ to name the output file when the -c switch is used.
I also use the -xansi switch which tells the compiler to use all the ANSI
features it has. A diff of the old and new versions follows,
% diff defaults.mk.orig defaults.mk
A31 CC = $(compiler) -c -g -o $@
changed to
B31 CC = $(compiler) -c -g -W0,-xansi
There were three things that I changed in boot/unix/apollo/custom.h.
Firstly I added a prototype for getenv(). Secondly, the files <limits.h>
or <values.h> aren't supplied by the system so I added #define's for MAXINT
and MAXLONG. The only non-trivial change that is needed is the handling of
variable argument lists. The Apollo supports a mixture of ANSI and
classical handling of variable arguments. It is quite happy about the ANSI
prototype format with the elipsis to denote the variable arguments but its
va_start only takes a single argument as per the Sun. If you define
VARIABLE_ARGUMENTS and set NUM_VA_ARGS to 1 it will however fail to compile
because the prototype of the function differs from the actual function
definition. For example, take the function nsprintf in file common.web.
Its prototype is
int nsprintf(char *s, char *fmt, int n, ...)
whereas its definition is
int nsprintf(va_alist)
va_dcl
{ ... }
The compiler expects the arguments to match out to the elipsis in the
prototype.
My solution was to set NUM_VA_ARGS to 2 so the ANSI stuff is used in the
function definition. I had to edit os.h to use the single argument option
for va_start. I also had to change the definition of C2 so, that the start
of the variable argument list is initialised properly.
Using these changed the new function definition is
int nsprintf(char *s, char *fmt, int n, int va_alist)
which matches the prototype. The last argument would be better expressed
as va_dcl which is what it is, however va_dcl expands to int va_alist; and we
don't need the semicolon.
In summary, here are the file differences,
% diff custom.h.orig custom.h
B75 char *getenv(char *name);
inserted before
A75
A152 #include<values.h>
changed to
B153
B154 #define MAXINT 2147483647
B155 #define MAXLONG 2147483647
A174 /* #define VARIABLE_ARGUMENTS */
changed to
B177 #define VARIABLE_ARGUMENTS
A179 #define NUM_VA_ARGS 2
changed to
B182 #define NUM_VA_ARGS 2 /* Really one but we will fix up os.h */
% diff os.h.orig os.h
A285 #define VA_START(a,n) va_start(a,n)
changed to
B285 #define VA_START(a,n) va_start(a)
A348 #define C2(cmnt) ,...) /* Variable args. */
changed to
B348 #define C2(cmnt) , int va_alist) /* Variable args. */
I also had to make one change to ratfor.c to overcome a strange compiler
bug. The line in question caused the compiler to crash!
% diff ratfor.c.orig ratfor.c
A4050 made_temp?id0(icase):copy_out(a,pa,!macro);
changed to
B4050 if (made_temp) id0(icase); else copy_out(a,pa,!macro);
-------------------------------------------------------------------------------